package huffman;

import java.util.*;


public class Huffman
{

	protected Hashtable<String, String>	htHuffTable;

	public Huffman()
	{
	}

	public String Compress( String b )
	{
		Compressor comp = new Compressor();
		String strCompressed = comp.Compress( b );
		this.htHuffTable = comp.htHuffTable;
		return strCompressed;
	}

	public String Decompress( String strText )
	{
		Decompressor dec = new Decompressor();
		dec.setHuffTable( this.htHuffTable );
		return dec.Decompress( strText );
	}

	public Hashtable<String, String> getHuffmanTable()
	{
		return htHuffTable;
	}

	public void setHuffmanTable( Hashtable<String, String> htHuffTable )
	{
		this.htHuffTable = htHuffTable;
	}
}
